class Comments < ActiveRecord::Migration
  def self.up
    create_table :comments, :force => true do |t|
      t.column :author, :string, :limit => 50, :null => false
      t.column :email, :string, :limit => 100, :default => ""
      t.column :website, :string, :limit => 100, :null => true, :default => nil
      t.column :body, :text, :null => false
      t.column :created_at, :datetime, :null => false
      t.column :commentable_id, :integer, :null => false
      t.column :commentable_type, :string, :limit => 15, :null => false
    end

  end

  def self.down
    drop_table :comments
  end
end